Skip to content

Fix latent kwarg bug in PreprocessedMetadataPbWrapper LocalUri branch#639

Queued
kmontemayor2-sc wants to merge 3 commits into
mainfrom
kmonte/fix-list-at-path-kwarg
Queued

Fix latent kwarg bug in PreprocessedMetadataPbWrapper LocalUri branch#639
kmontemayor2-sc wants to merge 3 commits into
mainfrom
kmonte/fix-list-at-path-kwarg

Conversation

@kmontemayor2-sc
Copy link
Copy Markdown
Collaborator

LocalFsUtils.list_at_path's keyword-only parameter was renamed from entity to file_system_entity, but the partial in PreprocessedMetadataPbWrapper.__get_feature_to_vocab_list_map still forwarded the old name. functools.partial doesn't validate kwargs at construction time, so the TypeError was latent — every production caller hits the GcsUri branch, and no test exercised the LocalUri branch. Add a unit test that constructs the wrapper with a LocalUri transform_fn_assets_uri to lock in the kwarg name. Also fix the stale entity reference in list_at_path's docstring.

Scope of work done

Where is the documentation for this feature?: N/A

Did you add automated tests or write a test plan?

Updated Changelog.md? NO

Ready for code review?: NO

LocalFsUtils.list_at_path's keyword-only parameter was renamed from
`entity` to `file_system_entity`, but the partial in
PreprocessedMetadataPbWrapper.__get_feature_to_vocab_list_map still
forwarded the old name. functools.partial doesn't validate kwargs at
construction time, so the TypeError was latent — every production
caller hits the GcsUri branch, and no test exercised the LocalUri
branch. Add a unit test that constructs the wrapper with a LocalUri
transform_fn_assets_uri to lock in the kwarg name. Also fix the stale
`entity` reference in list_at_path's docstring.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@kmontemayor2-sc
Copy link
Copy Markdown
Collaborator Author

/all_test

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 13, 2026

GiGL Automation

@ 17:14:15UTC : 🔄 Scala Unit Test started.

@ 17:24:11UTC : ✅ Workflow completed successfully.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 13, 2026

GiGL Automation

@ 17:14:16UTC : 🔄 E2E Test started.

@ 18:46:43UTC : ✅ Workflow completed successfully.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 13, 2026

GiGL Automation

@ 17:14:18UTC : 🔄 C++ Unit Test started.

@ 17:17:51UTC : ✅ Workflow completed successfully.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 13, 2026

GiGL Automation

@ 17:14:20UTC : 🔄 Integration Test started.

@ 18:33:14UTC : ✅ Workflow completed successfully.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 13, 2026

GiGL Automation

@ 17:14:20UTC : 🔄 Lint Test started.

@ 17:27:03UTC : ✅ Workflow completed successfully.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 13, 2026

GiGL Automation

@ 17:14:23UTC : 🔄 Python Unit Test started.

@ 18:16:03UTC : ✅ Workflow completed successfully.

Three markers no longer suppress any mypy errors: the partial() call,
the lambda assignment in the LocalUri branch, and the call site of
list_files_fn. The two on the GcsUri-branch assignments are still
load-bearing — assigning a Callable[[GcsUri], …] to a name previously
bound to a Callable[[LocalUri], …] is a real type incompatibility.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@kmontemayor2-sc kmontemayor2-sc marked this pull request as ready for review May 14, 2026 17:27
@kmontemayor2-sc kmontemayor2-sc enabled auto-merge May 14, 2026 17:27
@kmontemayor2-sc kmontemayor2-sc added this pull request to the merge queue May 14, 2026
Any commits made after this event will not be merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants